3.4.40 \(\int \frac {a+b \log (c x)}{d+\frac {e}{x}} \, dx\) [340]

Optimal. Leaf size=63 \[ \frac {a x}{d}-\frac {b x}{d}+\frac {b x \log (c x)}{d}-\frac {e (a+b \log (c x)) \log \left (1+\frac {d x}{e}\right )}{d^2}-\frac {b e \text {Li}_2\left (-\frac {d x}{e}\right )}{d^2} \]

[Out]

a*x/d-b*x/d+b*x*ln(c*x)/d-e*(a+b*ln(c*x))*ln(1+d*x/e)/d^2-b*e*polylog(2,-d*x/e)/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {199, 45, 2367, 2332, 2354, 2438} \begin {gather*} -\frac {b e \text {PolyLog}\left (2,-\frac {d x}{e}\right )}{d^2}-\frac {e \log \left (\frac {d x}{e}+1\right ) (a+b \log (c x))}{d^2}+\frac {a x}{d}+\frac {b x \log (c x)}{d}-\frac {b x}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x])/(d + e/x),x]

[Out]

(a*x)/d - (b*x)/d + (b*x*Log[c*x])/d - (e*(a + b*Log[c*x])*Log[1 + (d*x)/e])/d^2 - (b*e*PolyLog[2, -((d*x)/e)]
)/d^2

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin {align*} \int \frac {a+b \log (c x)}{d+\frac {e}{x}} \, dx &=\int \left (\frac {a+b \log (c x)}{d}-\frac {e (a+b \log (c x))}{d (e+d x)}\right ) \, dx\\ &=\frac {\int (a+b \log (c x)) \, dx}{d}-\frac {e \int \frac {a+b \log (c x)}{e+d x} \, dx}{d}\\ &=\frac {a x}{d}-\frac {e (a+b \log (c x)) \log \left (1+\frac {d x}{e}\right )}{d^2}+\frac {b \int \log (c x) \, dx}{d}+\frac {(b e) \int \frac {\log \left (1+\frac {d x}{e}\right )}{x} \, dx}{d^2}\\ &=\frac {a x}{d}-\frac {b x}{d}+\frac {b x \log (c x)}{d}-\frac {e (a+b \log (c x)) \log \left (1+\frac {d x}{e}\right )}{d^2}-\frac {b e \text {Li}_2\left (-\frac {d x}{e}\right )}{d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 64, normalized size = 1.02 \begin {gather*} \frac {a x}{d}-\frac {b x}{d}+\frac {b x \log (c x)}{d}-\frac {e (a+b \log (c x)) \log \left (\frac {e+d x}{e}\right )}{d^2}-\frac {b e \text {Li}_2\left (-\frac {d x}{e}\right )}{d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x])/(d + e/x),x]

[Out]

(a*x)/d - (b*x)/d + (b*x*Log[c*x])/d - (e*(a + b*Log[c*x])*Log[(e + d*x)/e])/d^2 - (b*e*PolyLog[2, -((d*x)/e)]
)/d^2

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 101, normalized size = 1.60

method result size
risch \(\frac {a x}{d}-\frac {a e \ln \left (d x +e \right )}{d^{2}}+\frac {b x \ln \left (c x \right )}{d}-\frac {b x}{d}-\frac {b e \dilog \left (\frac {c d x +c e}{e c}\right )}{d^{2}}-\frac {b e \ln \left (c x \right ) \ln \left (\frac {c d x +c e}{e c}\right )}{d^{2}}\) \(88\)
derivativedivides \(\frac {\frac {a c x}{d}-\frac {a e c \ln \left (c d x +c e \right )}{d^{2}}+\frac {b c x \ln \left (c x \right )}{d}-\frac {b c x}{d}-\frac {b e c \dilog \left (\frac {c d x +c e}{e c}\right )}{d^{2}}-\frac {b e c \ln \left (c x \right ) \ln \left (\frac {c d x +c e}{e c}\right )}{d^{2}}}{c}\) \(101\)
default \(\frac {\frac {a c x}{d}-\frac {a e c \ln \left (c d x +c e \right )}{d^{2}}+\frac {b c x \ln \left (c x \right )}{d}-\frac {b c x}{d}-\frac {b e c \dilog \left (\frac {c d x +c e}{e c}\right )}{d^{2}}-\frac {b e c \ln \left (c x \right ) \ln \left (\frac {c d x +c e}{e c}\right )}{d^{2}}}{c}\) \(101\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x))/(d+e/x),x,method=_RETURNVERBOSE)

[Out]

1/c*(a/d*c*x-a*e*c/d^2*ln(c*d*x+c*e)+b/d*c*x*ln(c*x)-b/d*c*x-b*e*c/d^2*dilog((c*d*x+c*e)/e/c)-b*e*c/d^2*ln(c*x
)*ln((c*d*x+c*e)/e/c))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 68, normalized size = 1.08 \begin {gather*} -\frac {{\left (\log \left (d x e^{\left (-1\right )} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-d x e^{\left (-1\right )}\right )\right )} b e}{d^{2}} - \frac {{\left (b \log \left (c\right ) + a\right )} e \log \left (d x + e\right )}{d^{2}} + \frac {b x \log \left (x\right ) + {\left (b {\left (\log \left (c\right ) - 1\right )} + a\right )} x}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x))/(d+e/x),x, algorithm="maxima")

[Out]

-(log(d*x*e^(-1) + 1)*log(x) + dilog(-d*x*e^(-1)))*b*e/d^2 - (b*log(c) + a)*e*log(d*x + e)/d^2 + (b*x*log(x) +
 (b*(log(c) - 1) + a)*x)/d

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x))/(d+e/x),x, algorithm="fricas")

[Out]

integral((b*x*log(c*x) + a*x)/(d*x + e), x)

________________________________________________________________________________________

Sympy [A]
time = 74.40, size = 156, normalized size = 2.48 \begin {gather*} - \frac {a e \left (\begin {cases} \frac {x}{e} & \text {for}\: d = 0 \\\frac {\log {\left (d x + e \right )}}{d} & \text {otherwise} \end {cases}\right )}{d} + \frac {a x}{d} + \frac {b e \left (\begin {cases} \frac {x}{e} & \text {for}\: d = 0 \\\frac {\begin {cases} - \operatorname {Li}_{2}\left (\frac {d x e^{i \pi }}{e}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (e \right )} \log {\left (x \right )} - \operatorname {Li}_{2}\left (\frac {d x e^{i \pi }}{e}\right ) & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (e \right )} \log {\left (\frac {1}{x} \right )} - \operatorname {Li}_{2}\left (\frac {d x e^{i \pi }}{e}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (e \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (e \right )} - \operatorname {Li}_{2}\left (\frac {d x e^{i \pi }}{e}\right ) & \text {otherwise} \end {cases}}{d} & \text {otherwise} \end {cases}\right )}{d} - \frac {b e \left (\begin {cases} \frac {x}{e} & \text {for}\: d = 0 \\\frac {\log {\left (d x + e \right )}}{d} & \text {otherwise} \end {cases}\right ) \log {\left (c x \right )}}{d} + \frac {b x \log {\left (c x \right )}}{d} - \frac {b x}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x))/(d+e/x),x)

[Out]

-a*e*Piecewise((x/e, Eq(d, 0)), (log(d*x + e)/d, True))/d + a*x/d + b*e*Piecewise((x/e, Eq(d, 0)), (Piecewise(
(-polylog(2, d*x*exp_polar(I*pi)/e), (Abs(x) < 1) & (1/Abs(x) < 1)), (log(e)*log(x) - polylog(2, d*x*exp_polar
(I*pi)/e), Abs(x) < 1), (-log(e)*log(1/x) - polylog(2, d*x*exp_polar(I*pi)/e), 1/Abs(x) < 1), (-meijerg(((), (
1, 1)), ((0, 0), ()), x)*log(e) + meijerg(((1, 1), ()), ((), (0, 0)), x)*log(e) - polylog(2, d*x*exp_polar(I*p
i)/e), True))/d, True))/d - b*e*Piecewise((x/e, Eq(d, 0)), (log(d*x + e)/d, True))*log(c*x)/d + b*x*log(c*x)/d
 - b*x/d

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x))/(d+e/x),x, algorithm="giac")

[Out]

integrate((b*log(c*x) + a)/(d + e/x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x\right )}{d+\frac {e}{x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x))/(d + e/x),x)

[Out]

int((a + b*log(c*x))/(d + e/x), x)

________________________________________________________________________________________